package com.demo.principle.interfaceIsolation;

public class InterfaceIsolation2 {

    public static void main(String[] args) {

    }
}


interface Interface2 {
    void operation1();

    void operation2();

    void operation3();
}

interface Interface3 {
    void operation1();

    void operation4();

    void operation5();
}

class ClassE implements Interface2 {

    @Override
    public void operation1() {
        System.out.println("operation1");
    }

    @Override
    public void operation2() {
        System.out.println("operation2");
    }

    @Override
    public void operation3() {
        System.out.println("operation3");
    }

}

class ClassF {
    public void depend1(Interface1 i) {
        i.operation1();
    }

    public void depend2(Interface1 i) {
        i.operation2();
    }

    public void depend3(Interface1 i) {
        i.operation2();
    }
}

class ClassG implements Interface3 {

    @Override
    public void operation1() {
        System.out.println("operation1");
    }

    @Override
    public void operation4() {
        System.out.println("operation4");
    }

    @Override
    public void operation5() {
        System.out.println("operation5");
    }
}

class ClassH {
    public void depend1(Interface1 i) {
        i.operation1();
    }

    public void depend4(Interface1 i) {
        i.operation4();
    }

    public void depend5(Interface1 i) {
        i.operation5();
    }
}